home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / AmigaE / Src / Rkrm / Math / dpieee.e next >
Text File  |  1995-09-20  |  768b  |  30 lines

  1. -> dpieee.e - Math DP IEEE example of dTst().
  2.  
  3. ->>> Header (globals)
  4. MODULE 'tools/longreal'
  5.  
  6. CONST STRSIZE=20
  7. CONST FRACTSIZE=STRSIZE-8
  8. ->>>
  9.  
  10. ->>> PROC main()
  11. PROC main() HANDLE
  12.   -> E-Note: use the longreals from 'tools/longreal' for double precision IEEE
  13.   DEF num1:longreal, result, six:longreal, s[STRSIZE]:STRING
  14.   dInit(FALSE)  -> E-Note: only use mathieeedoubbas library
  15.   dDiv(dPi(num1), dFloat(-6,six), num1)  -> -30 degrees in radians
  16.   -> E-Note: or alternatively use dInit(TRUE) and dRad(dFloat(-30,num1), num1)
  17.  
  18.   result:=dTst(num1)
  19.   WriteF('Num1 = \s and result = \d\n', dFormat(s, num1, FRACTSIZE), result)
  20.  
  21. EXCEPT DO
  22.   dCleanup()
  23.   SELECT exception
  24.   CASE "DLIB";  WriteF('Error: could not open mathieeedoubbas library\n')
  25.   ENDSELECT
  26. ENDPROC
  27. ->>>
  28.  
  29.  
  30.